package com.formina.engine;


import java.util.ArrayList;
import java.util.List;

import android.content.Context;
import android.view.Display;

public class Engine {
	public static Context CONTEXT;
	/*Constants that will be used in the game*/
	public static final int GAME_THREAD_DELAY = 4000;
	public static final int GAME_THREAD_FPS_SLEEP = (1000/60);	
	public static final int PLAYER_FORWARD = 1;
	public static final int PLAYER_RIGHT = 2;
	public static final int PLAYER_LEFT = 3;
	public static final float PLAYER_ROTATE_SPEED = 1f;
	public static final float PLAYER_WALK_SPEED = 0.1f;
	/*Game Variables*/
	public static int playerMovementAction = 0;
	public static Context context;
	public static Display display;
	public static ModelInfo Star;
	public static ModelInfo StarParticle;
	public static Boolean UseRandomColors = true;
	public static float[] DefaultColor = {1f,1f,1f,1f}; //white
	public static float[] mMVPMatrix = new float[16];
	public static float[] mVMatrix = new float[16];
	public static float[] mProjMatrix = new float[16];
	public static int mMVPMatrixHandle;
	public static int mMVMatrixHandle;
	public static int mLightPosHandle;
	public static int mPositionHandle;
	public static int mColorHandle;
	public static int mNormalHandle;
	public static int mLightPositionHandle;
	
	public static float WIDTH;
	public static float HEIGHT;

	
	public static float[] mLightModelMatrix = new float[16];	
	public static final float[] mLightPosInModelSpace = new float[] {0.0f, 0.0f, 0.0f, 1.0f};
	public static final float[] mLightPosInWorldSpace = new float[4];
	public static final float[] mLightPosInEyeSpace = new float[4];
	
	public static List<Model> Stars = new ArrayList<Model>();
	public static List<Effect> Effects = new ArrayList<Effect>();
	public static List<Model> Comets = new ArrayList<Model>();

    
	public static List<Pointer> Pointers = new ArrayList<Pointer>();

    public static Pointer GetPointer(int id){
            for(Pointer p: Pointers){
                    if(p.Id == id){
                            return p;
                    }
            }
            Pointer p =new Pointer();
            p.Id = id;
            Pointers.add(p);
            return p;
    }
	
}
